class Solution {
public:
    int multiply(int A, int B) {
        int ret = A;
        for (int i = 1; i < B; i++) {
            ret += A;
        }
        return ret;
    }
};